/**
 * Copyright 2020 Inc.
 **/
package com.myz.cloud.rocketmq.producer;

import com.myz.cloud.rocketmq.producer.mq.MqProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author maoyz0621 on 2020/7/7
 * @version v1.0
 */
@SpringBootApplication
public class RocketMqProducerApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(RocketMqProducerApplication.class, args);
    }

    @Autowired
    MqProducer mqProducer;

    @Override
    public void run(String... args) throws Exception {
        mqProducer.sendMsg("my-topic1", "aaa");
    }

}